{include 'public/header.php'}

<h3>管理序列号</h3>


<form class="form-inline" id="searchForm" style="margin-bottom:20px;">
	<div class="form-group">
		<label for="exampleInputName2">序列号关键词</label>
		<input type="text" class="form-control" id="exampleInputName2" value="{$smarty.get.search.keyword}" name="search[keyword]" placeholder="关键词">
	</div>

	<div class="form-group">
		<label for="exampleInputName2">年份</label>
		<input type="text" class="form-control" id="exampleInputName2" value="{$smarty.get.search.year}" name="search[year]" placeholder="年份">
	</div>

	<div class="form-group">
		<label for="exampleInputName2">状态</label>
		<select class="form-control" name="search[status]">
		  <option value="">选择</option>
		  <option value="0" {if $smarty.get.search.status === '0'} selected {/if}>未使用</option>
		  <option value="1" {if $smarty.get.search.status === '1'} selected {/if}>已使用</option>
		</select>
	</div>

	<div class="form-group">
		<label for="exampleInputName2">创建时间</label>
		<input type="date" class="form-control" name="search[create_start]" value="{$smarty.get.search.create_start}" size="6" placeholder="年份">
		<input type="date" class="form-control" name="search[create_end]" value="{$smarty.get.search.create_end}"  size="6" placeholder="年份">
	</div>

	<div class="row" style="margin-top:20px;text-align:center">
		<button type="submit" class="btn btn-success">查询</button>
		<button type="button" class="btn btn-default" onclick="$('#searchForm input, #searchForm select').val('')">重置</button>
	</div>
</form>

<table class="table table-striped table-bordered">
	<tr>
		<td>序号</td>
		<td>序列号</td>
		<td>机器码</td>
		<td>注册码</td>
		<td>年份</td>
		<td>状态</td>
		<td>创建时间</td>
		<td>注册时间</td>
	</tr>

	{foreach from=$list key=k item=value}  
	<tr>
		<td>{$value.id}</td>
		<td>{$value.xuliehao}</td>
		<td>{$value.jiqima}</td>
		<td>{$value.zhucema}</td>
		<td>{$value.year}</td>
		<td>{if $value.status == 0}<span style="color:green">未使用</span>{else}<span style="color:red">已使用</span>{/if}</td>
		<td>{$value.created_at}</td>
		<td>{$value.registerd_at}</td>
	</tr>
	{/foreach}
	<tr>
		<td colspan="7">
			{$pages}
		</td>
	</tr>
</table>

{include 'public/footer.php'}